﻿using System.Collections.Generic;

namespace Quick.Common.Monitor
{
    public class QmonitorFactory : IQmonitorFactory
    {
        private static readonly Qmonitor Qmonitor = new Qmonitor();

        static QmonitorFactory()
        {

        }

        public Dictionary<string, long> GetValues()
        {
            return Qmonitor.GetValues();
        }

        public void RecordMany(string name, long count, long time)
        {
            Qmonitor.RecordMany(name, count, time);
        }

        public void RecordOne(string name, long time)
        {
            RecordMany(name, 1L, time);
        }

        /// <summary>
        /// 记录一次
        /// </summary>
        public void RecordOne(string name)
        {
            RecordMany(name, 1L, 0L);
        }

    }
}
